package com.work.vo.main;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.work.constant.DictBizConstant;
import com.work.utils.BigDecimalSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictBizCache;

import java.math.BigDecimal;

/**
 * 船统计检算修正详情
 *
 * @author ：dujianyu
 * @since ：Created in 2024/7/1 13:18
 */
@Data
public class TwoStockTallyShipStatCheckDetail {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "检算类型")
    private String checkType;

    @ApiModelProperty(value = "检算类型")
    private String checkTypeName;

    public String getCheckTypeName() {
        if (Func.isNull(checkType)) {
            return "";
        }
        return DictBizCache.getValue(DictBizConstant.CHECK_TYPE, checkType);
    }

    @ApiModelProperty(value = "检算类型")
    private String checkReason;

    @ApiModelProperty(value = "理货件数")
    private Integer oriPiece;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(value = "理货吨数")
    private BigDecimal oriTon;

    @ApiModelProperty(value = "理货件数")
    private Integer toPiece;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(value = "理货吨数")
    private BigDecimal toTon;

    @ApiModelProperty(value = "检算件数")
    private Integer checkOriPiece;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(value = "检算吨数")
    private BigDecimal checkOriTon;

    @ApiModelProperty(value = "检算件数")
    private Integer checkToPiece;

    @JsonSerialize(using = BigDecimalSerializer.class)
    @ApiModelProperty(value = "检算吨数")
    private BigDecimal checkToTon;

}
